
<div class="bjui-pageHeader">
<form id="pagerForm" data-toggle="ajaxsearch" action="__URL__/collection" method="post">
	
	<input type="hidden" name="pageSize" value="{$numPerPage}">
    <input type="hidden" name="pageCurrent" value="{$_REQUEST['pageNum']|default=1}">
	 
         <div class="bjui-searchBar">
                 <label>关键词：</label><input type="text" value="{$_REQUEST['keys']}" name="keys" class="form-control" size="12" />
                 <label><if condition="in_array($_REQUEST['collection_time'],['2','3'])">交易<else />还款</if>时间：</label><input type='text' data-toggle='datepicker' value='{$_REQUEST['time1']}' name='time1' class='form-control' size='12' />-
                 <input type='text' data-toggle='datepicker' value='{$_REQUEST['time2']}' name='time2' class='form-control' size='12' />&nbsp;
                 <label>处理结果：</label>
                 <select name='collection_time' data-toggle='selectpicker'>
                 <option value=''>全部</option>
                 <option value='1' <if condition="1 EQ $_REQUEST['collection_time']">selected</if>>已通知</option>
                 <option value='-1' <if condition="-1 EQ $_REQUEST['collection_time']">selected</if>>未通知</option>
                 <option value='2' <if condition="2 EQ $_REQUEST['collection_time']">selected</if>>已回款</option>
                 <option value='3' <if condition="3 EQ $_REQUEST['collection_time']">selected</if>>已延期</option>

                </select>&nbsp;
				<label>分页数:</label>
			  <select name="page">
			    <if condition="$numPerPage == 15">
				  <option id="15" value="15" selected="selected">15</option>
				  <option value="20">20</option>
				  <option value="30">20</option>
				<elseif condition="$numPerPage == 20" />
				  <option id="20" value="20" selected="selected">20</option>
				  <option value="15">15</option>
				  <option value="30">30</option>
				<elseif condition="$numPerPage == 30" />
				  <option id="30" value="30" selected="selected">30</option>
				  <option value="15">15</option>
				  <option value="20">20</option>
				<else />
				  <option value=""></option>
				  <option value="15">15</option>
				  <option value="20">20</option>
				  <option value="30">30</option>
				</if>
			  </select>&nbsp;
                <!-- <if condition="$v.jieguo EQ $_REQUEST['jieguo']">selected<else/></if>  -->
             <button type="submit"  class="btn-default" data-icon="search">查询</button>
              <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true);" data-icon="undo">清空查询</a>
		      <php>if(display(CONTROLLER_NAME.'/del')){</php><span style="float:right;" ><a href="__URL__/del/navTabId/{:CONTROLLER_NAME}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定要清理吗？" data-icon="remove">清理</a></span><php>}</php>
			  <span><a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true);" data-icon="undo">刷新</a>&nbsp&nbsp&nbsp&nbsp
              <a class="btn btn-orange" href="__URL__/receive/navTabId/{:CONTROLLER_NAME}" class="btn btn-green btn-sm" data-toggle="dialog" data-id="dialog-mask" data-width="600" data-height="300" data-mask="true">领取</a></span>
		</div>  
</form>
</div>

<div class="bjui-pageContent tableContent">
     <table data-toggle="tablefixed" data-width="100%" data-layout-h="0" data-nowrap="true">
        <thead>
            <tr>
            <th width="30" height="30"></th>
            <th data-order-direction='desc' data-order-field='order_id'>订单号</th>
			      <th>用户姓名</th>
            <th>用户手机号</th>
            <th data-order-direction='desc' data-order-field='number'>金币(个)</th>
			      <th>借款金额</th>
			      <th data-order-direction='desc' data-order-field='loan_time'>借款日期</th>
            <th data-order-direction='desc' data-order-field='expire_time'>还款日期</th>
            <th data-order-direction='desc' data-order-field='repayment_amount'>应还金额(元)</th>
            <if condition="$_REQUEST['collection_time'] != '2'">
            <th data-order-direction="desc" data-order-field="expire_time">剩余天数</th>
            </if>
            <if condition="in_array($_REQUEST['collection_time'],['2','3'])">
            <th>延期天数</th>
            <th data-order-direction='desc' data-order-field='k_time'>交易时间</th>
            </if>
			      <th>催收状态</th>
            <th>类型</th>
			      <php>if(display(CONTROLLER_NAME.'/edit')){</php><th width="30%">操作</th><php>}</php>
			      <th ></th> 
            </tr>
        </thead>
        <tbody>
       <foreach name="list" item="v" key="k">
    	<tr>
        <td height=25>{$k+1}</td>
        <Td>{$v.order_id}</td>
        <Td><a href="__URL__/codes/order_id/{$v['order_id']}/type/1/navTabId/{:CONTROLLER_NAME}/phone/{$v['mobile_phone']}/day/{$v['expire_time']}"   class="btn btn-sm" data-toggle="doajax" data-confirm-msg="确定已经通知了吗?" data-id="dialog-mask" data-mask="true">{$v.user_name}</a></td>
        <Td>{$v.mobile_phone}</td>
        <Td>{$v.number}</td>
        <Td>{$v.money}</td>
        <td>{:date('Y-m-d H:i',$v['loan_time'])}</td>
        <Td>{:date('Y-m-d H:i',$v['expire_time'])}</td>
        <Td>{$v.repayment_amount}</Td>
        <if condition="$_REQUEST['collection_time'] != '2'">
        <td>{:countDown($v['expire_time'])}</td>
        </if>
        <if condition="in_array($_REQUEST['collection_time'],['2','3'])">
        <td>{$v.over_day}</td>
        <Td>{:date('Y-m-d H:i',$v['k_time'])}</td>
        </if>
        <!-- <td>{:$v['collection_time']>0?date('m-d H:i',$v['collection_time']):'<span style="color: red">待通知</span>'}</td> -->
        <if condition="$v['collection_time'] == 1">
            <td>承诺还款</td>
        <elseif condition="$v['collection_time'] == 2" />
            <td>敷衍跳票</td>
        <elseif condition="$v['collection_time'] == 3" />
            <td>拒绝还款</td>
        <elseif condition="$v['collection_time'] == 4" />
            <td>无人接听</td>
        <elseif condition="$v['collection_time'] == 5" />
            <td>正在通话</td>
        <elseif condition="$v['collection_time'] == 6" />
            <td>呼叫转移</td>
        <elseif condition="$v['collection_time'] == 7" />
            <td>关机</td>
        <elseif condition="$v['collection_time'] == 8" />
            <td>停机</td>
        <elseif condition="$v['collection_time'] == 9" />
            <td>空号</td>
        <else />
            <td>{$v['collection_time']}</td>
        </if>
        <td>{$v['trans_type']}</td>
		<php>if(display(CONTROLLER_NAME.'/edit')){</php>
        <td> 
         <a href="__URL__/edit/id/{$v['order_id']}/navTabId/{:CONTROLLER_NAME}"   class="btn btn-green btn-sm" data-toggle="dialog" data-width="1100" data-height="800" data-id="dialog-mask" data-mask="true" >详情</a>
       <!--   <a href="__URL__/inform/order_id/{$v['order_id']}/type/1/navTabId/{:CONTROLLER_NAME}/va/pass" class="btn btn-green" data-toggle="dialog" data-width="900" data-height="500" data-id="dialog-mask" data-mask="true" data-icon="plus" >通知标记</a> -->
    
        <a href="__URL__/spendwrite/order_id/{$v['order_id']}/navTabId/{:CONTROLLER_NAME}" class="btn btn-green" data-toggle="dialog" data-width="900" data-height="500" data-id="dialog-mask" data-mask="true" data-icon="plus">进度记录</a>

        <if condition="in_array($_REQUEST['collection_time'],['2','3'])">
         <a href="__URL__/continueList/order_id/{$v['order_id']}/navTabId/{:CONTROLLER_NAME}" class="btn btn-green" data-toggle="dialog" data-width="500" data-height="300" data-id="dialog-mask" data-mask="true" >交易记录</a>
        </if>

        <a href="__URL__/blacklist/id/{$v['uid']}/type/1/navTabId/{:CONTROLLER_NAME}/va/nopass/uid/{$v['uid']}/suffit/{$suffit}"   class="btn btn-green btn_sm" data-toggle="dialog" data-width="900" data-height="500" data-id="dialog-mask" data-mask="true">黑名单</a>

         <a href="__URL__/send_back/order_id/{$v['order_id']}/type/1/navTabId/{:CONTROLLER_NAME}/va/pass"   class="btn btn-green btn-sm" data-toggle="doajax" data-confirm-msg="确定已经通知了吗?" data-id="dialog-mask" data-mask="true" >退还</a>

		     <!-- <a href="__URL__/duanxin/order_id/{$v['order_id']}/type/1/navTabId/{:CONTROLLER_NAME}/name/{$v['user_name']}"   class="btn btn-green btn-sm" data-toggle="dialog" data-width="950" data-height="500" data-id="dialog-mask" data-mask="true" >短信发送</a> -->
		</td>
        <php>}</php>
		<td>
		</td>
        </tr>
        </foreach>
        </tbody>
    </table>
    <div class="bjui-pageFooter">
        <div class="pages">
            <span>共 {$totalCount} 条  每页 {$numPerPage} 条</span>
        </div>
        <div class="pagination-box" data-toggle="pagination" data-total="{$totalCount}" data-page-size="" data-page-current="{$currentPage}">
      </div>
</div>
</div>